package starter;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.util.Date;

import javax.swing.UIManager;

import controller.ConnectionAvailable;
import controller.Console;
import types.ConsoleType;
import view.Main_Frame;
import view.loginPanel;
import de.javasoft.plaf.synthetica.SyntheticaAluOxideLookAndFeel;

public class Starterjp {

	public static void main(String[] args) {
		String message = null;
		ConsoleType type = null;
  
		try {
			UIManager.setLookAndFeel(new SyntheticaAluOxideLookAndFeel());
		} catch (Exception e) {
			e.printStackTrace();
		}

		Main_Frame mf = Main_Frame.getInstance();
		Container contentPane = mf.getContentPane();
		contentPane.setLayout(new BorderLayout());
		contentPane.add(loginPanel.getInstance());

		Console c = Console.getInstance();
		c.setBackground(Color.BLACK);
		contentPane.add(c, BorderLayout.SOUTH);

		mf.setContentPane(contentPane);
		mf.setVisible(true);
	
		if (ConnectionAvailable.getInstance().isInternetReachable()) {
		} else {
			message = "Check uw internetverbinding";
			type = ConsoleType.ERROR;
			Console.getInstance().setConsole(message, type);
		}

	}
}